#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void prf(char a[],int x,int y);
int main()
{
	int x,y,l;
	char a[100];
	while(scanf("%s %d %d",a,&x,&y)!=EOF)
	{
	    prf(a,x,y);//x是起始位置，y是结束位置 
    }
	return 0;
}
void prf(char a[],int x,int y)
{
	char *b;
	int i,l;
	l=y-x+1;
	b=(char *)calloc(y-x+2,sizeof(char));//多申请一个地址存结束符 
	for(i=0;i<l;i++,x++)
	b[i]=a[x-1];
	b[i]='\0';
	printf("%s\n",b);
}